package com.koron.ticket.work.logicticket.firstlevelhotwork.controller;

import com.koron.bean.base.Response;
import com.koron.bean.workflow.SubmitterParam;
import com.koron.bean.workflow.WorkflowUser;
import com.koron.ticket.work.workticket.service.WorkTicketService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Slf4j
@RestController
@RequestMapping("work/firstlevelhotwork/workflow")
public class FirstLevelHotWorkflowController {


    @Autowired
    private WorkTicketService workticketservice;

    @PostMapping("/draftwrite/handler")
    public Response<List<WorkflowUser>> draftwrite(@RequestBody SubmitterParam submitterParam) {
        return null;
    }

    //先写同一个插件，待确认
    @PostMapping("/callsign/submitter")
    public Response<List<WorkflowUser>> callsign(@RequestBody SubmitterParam submitterParam) {
        //选择 待许可人
        List<WorkflowUser> list = workticketservice.getWorkflowUsers(submitterParam, null, 4);
        return Response.success(list);
    }
}
